#ifndef COMPONENTSCRIPTABLE_H
#define COMPONENTSCRIPTABLE_H

#include "Component.h"

#include "../base/ScriptableLua.h"


class ComponentScriptable : public Component , public ScriptableLua
{
    public:
     ComponentScriptable(ComponentManager* _parent, ComponentArguments _args);
    virtual ~ComponentScriptable();

    virtual void initialize();
    virtual void destroy();

    virtual void saveToXML(TiXmlElement* parentElement);
    virtual void loadFromXML(TiXmlElement* parentElement);

    virtual void update(double timeSinceLastFrame);
    virtual void registerNewComponent(std::string _newComponentName);


     //lua funcs
        static int log(lua_State *LS);

        static int setPosition(lua_State *LS);//setPosition(x,y,z)
        static int getPosition(lua_State *LS);//x,y,z = getPosition()

        static int giveOrderToGoTo(lua_State *LS);
        static int getObjectNearWithComponent(lua_State *LS);

        static int getObjectPositionName(lua_State *LS);



    protected:
    private:
};

#endif // COMPONENTSCRIPTABLE_H
